<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function getNum(num1=0,num2=0,num3=0) {
      document.write(`三个数的合为${num1+num2+num3}<br>`)
      document.write(`三个数的差为${num1-um2-num3}<br>`)
      document.write(`三个数的平均值为${(num1+num2+num3)/3}<br>`)
      document.write(`三个数的商为${num1/num2/num3}<br>`)
    }
    let arr = []
    for(let i = 1; i<= 3 ;i++){
      arr.push(+prompt(`请输入第${i}个数`))
    }
    getNum(arr[0],arr[1],arr[2])
  </script>
</body>
</html>